package com.example.firstjavamqtt.service.base;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.firstjavamqtt.model.base.Device;

import java.util.ArrayList;
import java.util.List;


public interface DeviceService extends IService<Device> {
    //注册设备
    void registerDevice(Device device);
    //获得设备
    List<Device> getDeviceList();
    //根据设备id删除设备
    void deleteDeviceByDeviceId(String device_id);
    //设置设备上下线
    void setDeviceStatus(String deviceId, boolean online);
    //设备全部下线
    void setAllDeviceOffline();
    //根据设备id获取设备
    Device getDeviceByDeviceId(String deviceId);
    //根据设备类型获取设备
    List<Device> getDeviceByDeviceType(String deviceType);
    //根据设备类型删除
    void deleteDeviceByDeviceType(String deviceType);
    //根据id批量删除
    void deleteDeviceByBatchId(ArrayList<Integer> batchId);
    //根据设备id删除
    void deleteDeviceById(int id);

    Page<Device> getDevicePageList(int pageNum,int limit);
}
